<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
       // 1, 获取65-90中的随机数, 并将该数当成ASCII码,转换成字母
       function fn(m,n){
        var max=m>n?m:n;
        var min=n<m?n:m;
        return parseInt(Math.random()*(max-min+1))+min;
    }
    function fn2(m,n){
        var newNum=fn(m,n);
        return String.fromCharCode(newNum);
    }
    console.log(fn(65,90));
    console.log(fn2(65,90));
    </script>
</body>
</html>